import java.util.*;

public class Test {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] arr = new int[n];
        for(int i=0;i<n;i++){
            arr[i] = sc.nextInt();
        }

        int[] oldarr = new int[n];
        for(int i=0;i<n;i++){
            oldarr[i] = arr[i];
        }

        boolean[] processed = new boolean[n];

        int tempindex = 0;
        for(int i=0;i<n;i++){
           tempindex = i;
           for(int j=i+1;j<n;j++){
            if(arr[tempindex]>arr[j]){
                tempindex = j;
            }
           } 
           int temp = arr[tempindex];
           arr[tempindex] = arr[i];
           arr[i] = temp;
        }

        for(int i=0;i<n;i++){
            for(int j=0;j<n;j++){
                if(arr[i]==oldarr[j] && !processed[j]){
                    System.out.print(j+1 +" ");
                    processed[j] = true;
                    break;
                } 
            }
        }

        int sum = 0;
        for(int i=0;i<n-1;i++){
            for(int j=0;j<i+1;j++){
                sum = sum + arr[j];
            }
        }
        System.out.println(String.format("%.2f", (double)sum/n));
        
    }

    
}
